﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VERKProjectHopur16.Models.EventViewModel>" %>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label" style="display:none">
                <%: Html.LabelFor(model => model.EventID) %>
            </div>
            <div class="editor-field" style="display:none">
                <%: Html.TextBoxFor(model => model.EventID) %>
                <%: Html.ValidationMessageFor(model => model.EventID) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Name) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Name) %>
                <%: Html.ValidationMessageFor(model => model.Name) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.StartDate) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.StartDate, new { @id = "form-start-date" })%>
                <%: Html.ValidationMessageFor(model => model.StartDate) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.EndDate) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.EndDate, new { @id = "form-end-date" })%>
                <%: Html.ValidationMessageFor(model => model.EndDate) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Description) %>
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.Description, 15, 50, new { @id = "form-text-textarea" })%>
                <%: Html.ValidationMessageFor(model => model.Description) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Departments) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.DepartmentID, Model.Departments) %>
                <%: Html.ValidationMessageFor(model => model.DepartmentID) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Authors) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.AuthorID, Model.Authors)%>
                <%: Html.ValidationMessageFor(model => model.AuthorID)%>
            </div>  
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back", "AllEvent") %>
    </div>




